web3.js@0.2x.x web3.eth.getTransactionFromBlock
getTransactionFromBlock(hashStringOrNumber, indexNumber [, callback])
ブロックハッシュまたはブロック番号と、トランザクションのインデックス位置に基づきトランザクションを返します。
パラメータ
1. String|Number
ブロック番号またはハッシュ
または "earliest", "latest", "pending" のいずれか
2. Number
トランザクションのインデックス位置
3. Function
オプショナル
コールバック関数を渡した場合は、HTTP リクエストが非同期に実行されます。
戻り値
Object
トランザクションオブジェクト
トランザクションオブジェクトの詳細については、web3.js@0.2x.x web3.eth.getTransaction を参考にしてください。
サンプルコード
code:example.js
var transaction = web3.eth.getTransactionFromBlock('0x4534534534', 2);
console.log(transaction); // see web3.eth.getTransaction
参考
https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionfromblock
#web3.js@0.2x.x #web3.js